package org.springboot.cloud.controller;


import org.springboot.cloud.mapper.ClassesMapper;
import org.springboot.entity.Classes;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
@Controller
public class CloudController {

    @Autowired
    private ClassesMapper classesMapper;
    @RequestMapping("/likeName")
    @ResponseBody
    public String likeName(){
        return "aaaaaaa";
    }
    @ResponseBody
    @RequestMapping(value = "/getClassesAll" ,method = RequestMethod.GET)
    public String getClassesAll(){
        List<Classes> classesLIST=classesMapper.selectClassesAll();
        return classesLIST.toString();
    }
}
